<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="f"  uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h"  uri="http://java.sun.com/jsf/html"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<html>
	<head>
		<title>.:: SisMed - Administrar Cirurgia::.</title>
		<link href="rules.css" rel="stylesheet" type="text/css" />
		<link href="links_text.css" rel="stylesheet" type="text/css" />
		<style type="text/css">
		<!--
		.style3 {color: #0099FF}
		-->
		</style>
	</head>

<body>
<div id="container" style="border-width: 5px; border-style: solid; border-color: blue;background-color:#E8E8EA;">
  <div id="header"><img src="images/cabecalho.jpg" width="769" height="175" /></div>
  <div id="leftBar">
    <c:import url="menuMedico.jsp"></c:import>
  </div>
  <div id="content">
  	<br><br>

<f:view>
	<h:form style="width: 60%;">
		<rich:panel header="Administrar Cirurgia" >
							
				<rich:dataTable id="cirurgia" border="1"  value="#{cirurgiaBean.listaDataModel}"    var="cirurgia"  rendered="true" rows="5">
					
					<h:column>
						<f:facet name="header">
							<h:outputText value="Id" />
						</f:facet>
						<h:outputText value="#{cirurgia.id}" />
					</h:column>
					
					<h:column>
						<f:facet name="header">
							<h:outputText value="Paciente" />
						</f:facet>
						<h:outputText value="#{cirurgia.paciente.nome}" />
					</h:column>
				
					<h:column>
						<f:facet name="header">
							<h:outputText value="Medico" />
						</f:facet>
						<h:outputText value="#{cirurgia.medico.nome}" />
					</h:column>
							
					<h:column>
						<f:facet name="header">
							<h:outputText value="Enfermeiro" />
						</f:facet>
						<h:outputText value="#{cirurgia.enfermeiro.nome}" />
					</h:column>
					
					<h:column>
						<f:facet name="header">
							<h:outputText value="Local" />
						</f:facet>
						<h:outputText value="#{cirurgia.local}" />
					</h:column>
					
					<h:column>
						<f:facet name="header">
							<h:outputText value="Tipo" />
						</f:facet>
						<h:outputText value="#{cirurgia.tipo}" />
					</h:column>
					
					<h:column>
						<f:facet name="header">
							<h:outputText value="Data" />
						</f:facet>
						<h:outputText value="#{cirurgia.data}" />
					</h:column>
					
					<h:column>
						<f:facet name="header">
							<h:outputText value="Hora" />
						</f:facet>
						<h:outputText value="#{cirurgia.hora}" />
					</h:column>
										
					<h:column>
						<f:facet name="header">
							<h:outputText value="Excluir" />
						</f:facet>	
						<center><h:commandLink action="#{cirurgiaBean.excluir}">Excluir</h:commandLink></center>				
					</h:column>
									
					<f:facet name="footer">
						<rich:datascroller></rich:datascroller>
					</f:facet>
			
				</rich:dataTable>
		</rich:panel>
	</h:form>
</f:view>
  </div>
  <div id="footer">
    <div align="center">:::                         &copy; - 2009 - SISMED :::</div>
  </div>
  
</div>
</body>
</html>